﻿<%@ Page Title="" Language="vb" AutoEventWireup="false" MasterPageFile="~/Site.Master" CodeBehind="Members.aspx.vb" Inherits="ArduinoPlayground.Rank" %>
<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <p>
    <br />
</p>
    <p>
       <h2>Current Members:</h2> </p>
    <p>
        <asp:ListView ID="ListView1" runat="server" DataKeyNames="username" 
            DataSourceID="Members_SqlDataSource" GroupItemCount="3">
            <AlternatingItemTemplate>
                <td id="Td1" runat="server" style="background-color:#DCDCDC;color: #000000;">
 
                    <asp:Label ID="FirstNameLabel" runat="server" Text='<%# Eval("FirstName") %>' />&nbsp;
                    <asp:Label ID="LastNameLabel" runat="server" Text='<%# Eval("LastName") %>' />
                    <br />
                    <img src ='<%# Eval("Avatar") %>' style="width:120px;height:120px" />
                    <br />Born:
                    <asp:Label ID="DOBLabel" runat="server" Text='<%# Eval("DOB") %>' />
                    <br />User Since:
                    <asp:Label ID="RegistrationLabel" runat="server" 
                        Text='<%# Eval("Registration") %>' />
                    <br />Occupation:
                    <asp:Label ID="OccupationLabel" runat="server" 
                        Text='<%# Eval("Occupation") %>' />
                    <br />Country:
                    <asp:Label ID="CountryLabel" runat="server" Text='<%# Eval("Country") %>' />
                    <br />
                </td>
            </AlternatingItemTemplate>
            <EditItemTemplate>
                <td runat="server" style="background-color:#008A8C;color: #FFFFFF;">
                    username:
                    <asp:Label ID="usernameLabel1" runat="server" Text='<%# Eval("username") %>' />
                    <br />FirstName:
                    <asp:TextBox ID="FirstNameTextBox" runat="server" 
                        Text='<%# Bind("FirstName") %>' />
                    <br />LastName:
                    <asp:TextBox ID="LastNameTextBox" runat="server" 
                        Text='<%# Bind("LastName") %>' />
                    <br />Avatar:
                    <asp:TextBox ID="AvatarTextBox" runat="server" Text='<%# Bind("Avatar") %>' />
                    <br />DOB:
                    <asp:TextBox ID="DOBTextBox" runat="server" Text='<%# Bind("DOB") %>' />
                    <br />Registration:
                    <asp:TextBox ID="RegistrationTextBox" runat="server" 
                        Text='<%# Bind("Registration") %>' />
                    <br />Occupation:
                    <asp:TextBox ID="OccupationTextBox" runat="server" 
                        Text='<%# Bind("Occupation") %>' />
                    <br />Country:
                    <asp:TextBox ID="CountryTextBox" runat="server" Text='<%# Bind("Country") %>' />
                    <br />
                    <asp:Button ID="UpdateButton" runat="server" CommandName="Update" 
                        Text="Update" />
                    <br />
                    <asp:Button ID="CancelButton" runat="server" CommandName="Cancel" 
                        Text="Cancel" />
                    <br />
                </td>
            </EditItemTemplate>
            <EmptyDataTemplate>
                <table runat="server" 
                    style="background-color: #FFFFFF;border-collapse: collapse;border-color: #999999;border-style:none;border-width:1px;">
                    <tr>
                        <td>
                            No data was returned.</td>
                    </tr>
                </table>
            </EmptyDataTemplate>
            <EmptyItemTemplate>
<td runat="server" />
            </EmptyItemTemplate>
            <GroupTemplate>
                <tr ID="itemPlaceholderContainer" runat="server">
                    <td ID="itemPlaceholder" runat="server">
                    </td>
                </tr>
            </GroupTemplate>
            <InsertItemTemplate>
                <td runat="server" style="">
                    username:
                    <asp:TextBox ID="usernameTextBox" runat="server" 
                        Text='<%# Bind("username") %>' />
                    <br />FirstName:
                    <asp:TextBox ID="FirstNameTextBox" runat="server" 
                        Text='<%# Bind("FirstName") %>' />
                    <br />LastName:
                    <asp:TextBox ID="LastNameTextBox" runat="server" 
                        Text='<%# Bind("LastName") %>' />
                    <br />Avatar:
                    <asp:TextBox ID="AvatarTextBox" runat="server" Text='<%# Bind("Avatar") %>' />
                    <br />DOB:
                    <asp:TextBox ID="DOBTextBox" runat="server" Text='<%# Bind("DOB") %>' />
                    <br />Registration:
                    <asp:TextBox ID="RegistrationTextBox" runat="server" 
                        Text='<%# Bind("Registration") %>' />
                    <br />Occupation:
                    <asp:TextBox ID="OccupationTextBox" runat="server" 
                        Text='<%# Bind("Occupation") %>' />
                    <br />Country:
                    <asp:TextBox ID="CountryTextBox" runat="server" Text='<%# Bind("Country") %>' />
                    <br />
                    <asp:Button ID="InsertButton" runat="server" CommandName="Insert" 
                        Text="Insert" />
                    <br />
                    <asp:Button ID="CancelButton" runat="server" CommandName="Cancel" 
                        Text="Clear" />
                    <br />
                </td>
            </InsertItemTemplate>
            <ItemTemplate>
                <td runat="server" style="background-color:#DCDCDC;color: #000000;">
 
                    <asp:Label ID="FirstNameLabel" runat="server" Text='<%# Eval("FirstName") %>' />&nbsp;
                    <asp:Label ID="LastNameLabel" runat="server" Text='<%# Eval("LastName") %>' />
                    <br />
                    <img src ='<%# Eval("Avatar") %>' style="width:120px;height:120px" />
                    <br />Born:
                    <asp:Label ID="DOBLabel" runat="server" Text='<%# Eval("DOB") %>' />
                    <br />User Since:
                    <asp:Label ID="RegistrationLabel" runat="server" 
                        Text='<%# Eval("Registration") %>' />
                    <br />Occupation:
                    <asp:Label ID="OccupationLabel" runat="server" 
                        Text='<%# Eval("Occupation") %>' />
                    <br />Country:
                    <asp:Label ID="CountryLabel" runat="server" Text='<%# Eval("Country") %>' />
                    <br />
                </td>
            </ItemTemplate>
            <LayoutTemplate>
                <table runat="server">
                    <tr runat="server">
                        <td runat="server">
                            <table ID="groupPlaceholderContainer" runat="server" border="1" 
                                style="background-color: #FFFFFF;border-collapse: collapse;border-color: #999999;border-style:none;border-width:1px;font-family: Verdana, Arial, Helvetica, sans-serif;">
                                <tr ID="groupPlaceholder" runat="server">
                                </tr>
                            </table>
                        </td>
                    </tr>
                    <tr runat="server">
                        <td runat="server" 
                            style="text-align: center;background-color: #CCCCCC;font-family: Verdana, Arial, Helvetica, sans-serif;color: #000000;">
                            <asp:DataPager ID="DataPager1" runat="server" PageSize="12">
                                <Fields>
                                    <asp:NextPreviousPagerField ButtonType="Button" ShowFirstPageButton="True" 
                                        ShowNextPageButton="False" ShowPreviousPageButton="False" />
                                    <asp:NumericPagerField />
                                    <asp:NextPreviousPagerField ButtonType="Button" ShowLastPageButton="True" 
                                        ShowNextPageButton="False" ShowPreviousPageButton="False" />
                                </Fields>
                            </asp:DataPager>
                        </td>
                    </tr>
                </table>
            </LayoutTemplate>
            <SelectedItemTemplate>
                <td runat="server" 
                    style="background-color:#008A8C;font-weight: bold;color: #FFFFFF;">
                    username:
                    <asp:Label ID="usernameLabel" runat="server" Text='<%# Eval("username") %>' />
                    <br />FirstName:
                    <asp:Label ID="FirstNameLabel" runat="server" Text='<%# Eval("FirstName") %>' />
                    <br />LastName:
                    <asp:Label ID="LastNameLabel" runat="server" Text='<%# Eval("LastName") %>' />
                    <br />Avatar:
                    <asp:Label ID="AvatarLabel" runat="server" Text='<%# Eval("Avatar") %>' />
                    <br />DOB:
                    <asp:Label ID="DOBLabel" runat="server" Text='<%# Eval("DOB") %>' />
                    <br />Registration:
                    <asp:Label ID="RegistrationLabel" runat="server" 
                        Text='<%# Eval("Registration") %>' />
                    <br />Occupation:
                    <asp:Label ID="OccupationLabel" runat="server" 
                        Text='<%# Eval("Occupation") %>' />
                    <br />Country:
                    <asp:Label ID="CountryLabel" runat="server" Text='<%# Eval("Country") %>' />
                    <br />
                </td>
            </SelectedItemTemplate>
        </asp:ListView>
        <asp:SqlDataSource ID="Members_SqlDataSource" runat="server" 
            ConnectionString="<%$ ConnectionStrings:ArduinoPlaygroundConnectionString %>" 
            ProviderName="<%$ ConnectionStrings:ArduinoPlaygroundConnectionString.ProviderName %>" 
            SelectCommand="SELECT [username], [FirstName], [LastName], [Avatar], [DOB], [Registration], [Occupation], [Country] FROM [Profile]">
        </asp:SqlDataSource>
</p>
    <p>
        &nbsp;</p>
<p>
</p>
<p>
</p>
<p>
</p>
</asp:Content>
